package test888;

import test888.Day;

public class Dog {
    private String name;
    private int age;
    private Day day;

    public Dog() {
    }

    public Dog(String name, int age, Day day) {
        this.name = name;
        this.age = age;
        this.day = day;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return age
     */
    public int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 获取
     * @return day
     */
    public Day getDay() {
        Day day2 = new Day(day);
        return day2;
    }

    /**
     * 设置
     * @param day
     */
    public void setDay(Day day) {
        this.day = day;
    }

    public String toString() {
        return "Dog{name = " + name + ", age = " + age + ", day = " + day + "}";
    }
}
